<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="" method="post">
    <input type="text" name="uname">
<input type="submit" value="搜索">
    <a href="{% url 'app1:adduser' %}"><input type="button" value="新增"></a>
</form>
<table border="1">
    <tr>
        <td>用户名</td>
        <td>真实姓名</td>
        <td>电话</td>
        <td>性别</td>
        <td>角色</td>
        <td>地址</td>
        <td>操作</td>
    </tr>
   {% for i in user1 %}
    <tr>
        <td>{{ i.uname }}</td>
        <td>{{ i.truename }}</td>
        <td>{{ i.tel }}</td>
        <td>{{ i.sex }}</td>
        <td>{{ i.eid.rolename }}</td>
        <td>{{ i.address }}</td>
        <td><a href="{% url 'app1:deluser' i.id %}">删除</a> <a href="{% url 'app1:update' i.id %}">修改</a></td>
    </tr>
   {% endfor %}

</table>
</body>
</html>